﻿@model IEnumerable<Film8.Models.Movie>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
@using (Ajax.BeginForm(
    new AjaxOptions
    {
        HttpMethod = "get",
        InsertionMode = InsertionMode.Replace,
        UpdateTargetId = "movieList"
    }
))
{
<p>
    Find by title: @Html.TextBox("SearchString")
    Find by genre: @Html.TextBox("SearchStringGenre")
    Find by year: @Html.TextBox("SearchStringYear")

    <input type="submit" value="Search" />
</p>

}

@Html.Partial("_MoviesTable", Model)